<template>
	<view class="app-tabbar-child-nearby-view">
		<scroll-view scroll-y="true"  @scrolltolower="handleScrolltolower">
			<page-view index="tabbarChildNearbyView"></page-view>
		</scroll-view>
	</view>
</template>
<script lang="ts">
	import {
		defineComponent
	} from 'vue'
	import {
		useTabbar
	} from '../../utils/customTabbar'
	import customTabbar from '../../utils/customTabbar'
	import PageView from './index.vue'


	export default defineComponent({
		props: {
			index: {
				type: String,
				required: true
			}
		},
		components: {
			PageView
		},
		setup(props) {
			const {
				onShow
			} = useTabbar(props.index)

			const handleScrolltolower = () => {
				customTabbar.onReachBottom('tabbarChildNearbyView');
			}


			onShow(() => {
				customTabbar.onShow('tabbarChildNearbyView');
			})
			


			return {
				handleScrolltolower
			}
		}
	})
</script>

<style lang="scss" scoped>
@include appBem_b(tabbar-child-nearby-view){
	height:100%;
	scroll-view{
		height:100%;
	}
}
</style>